package edu.infomatik.tundra.model;

import java.util.Map;

import org.apache.tapestry5.OptionModel;

import edu.infomatik.tundra.logic.SprintBean;
import edu.infomatik.tundra.logic.WorkKinds;

public class SprintIdOptionModel implements OptionModel {

	private SprintBean sprint;

	public SprintIdOptionModel(SprintBean sprint){
		this.sprint=sprint;
	}
	@Override
	public Map<String, String> getAttributes() {
		return null;
	}

	@Override
	public String getLabel() {
		return sprint.getId()+": "+sprint.getName();
	}

	@Override
	public Object getValue() {
		return sprint;
	}

	@Override
	public boolean isDisabled() {
		if (sprint.getKind()==WorkKinds.SPRINT_VALUE)
			return false;
		return true;
	}

}
